package com.z8fz.admin.food.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.z8fz.admin.food.dao.FoodMethodDao;
import com.z8fz.admin.food.model.Method;
import com.z8fz.admin.food.service.MethodService;
import com.z8fz.common.BaseDao;
import com.z8fz.common.pager.PageModel;

@Service
public class MethodServiceImpl extends BaseDao implements MethodService {

	public void add(Method method) {
		foodMethodDao.insert(method);
	}

	public void addCount(Integer id) {
		foodMethodDao.insertReadCount(id);
		
	}

	public int findMaxStep(Integer id) {
		return foodMethodDao.selectMaxStep(id);
	}

	public PageModel findMethods(Integer id) {
		return foodMethodDao.selectMethods(id);
	}
	
	@Autowired
	private FoodMethodDao foodMethodDao;
	
	

}
